<template>
    <div>
        这是第二个页面
        <div class="login-btn">
             <el-button type="primary" @click="submit()">测试</el-button>
        </div>
    </div>
</template>

<script>
import { test } from '@/api/admin'

export default {
    data() {
        return {
            
        }
    },
    methods: {
        submit(){
            test().then((res) =>{
                if(res.data.code === 1){
                    this.$message.success("测试成功");
                }
            }).catch(error =>{
                console.log(error)
            })
        }
    }
    

}
</script>

<style>
.login-btn {
    text-align: center;
}
</style>